Integrand size = 13, antiderivative size = 42 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)}-\frac {\text {arctanh}(\cos (x))}{a+b} \]
Time = 0.06 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.19 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=\frac {-\frac {2 \sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a}}+\log (1-\cos (x))-\log (1+\cos (x))}{2 (a+b)} \]
((-2*Sqrt[b]*ArcTan[(Sqrt[b]*Cos[x])/Sqrt[a]])/Sqrt[a] + Log[1 - Cos[x]] - Log[1 + Cos[x]])/(2*(a + b))
Time = 0.22 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3042, 25, 3669, 303, 218, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {1}{\cos \left (x+\frac {\pi }{2}\right ) \left (a+b \sin \left (x+\frac {\pi }{2}\right )^2\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\cos \left (x+\frac {\pi }{2}\right ) \left (b \sin \left (x+\frac {\pi }{2}\right )^2+a\right )}dx\) |
\(\Big \downarrow \) 3669 |
\(\displaystyle -\int \frac {1}{\left (1-\cos ^2(x)\right ) \left (b \cos ^2(x)+a\right )}d\cos (x)\) |
\(\Big \downarrow \) 303 |
\(\displaystyle -\frac {\int \frac {1}{1-\cos ^2(x)}d\cos (x)}{a+b}-\frac {b \int \frac {1}{b \cos ^2(x)+a}d\cos (x)}{a+b}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {\int \frac {1}{1-\cos ^2(x)}d\cos (x)}{a+b}-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\sqrt {b} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)}-\frac {\text {arctanh}(\cos (x))}{a+b}\) |
3.1.14.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Simp[b/(b *c - a*d) Int[1/(a + b*x^2), x], x] - Simp[d/(b*c - a*d) Int[1/(c + d*x ^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ (p_.), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Simp[ff/f S ubst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e + f*x] /ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
Time = 0.21 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.33
method | result | size |
default | \(-\frac {\ln \left (1+\cos \left (x \right )\right )}{2 a +2 b}-\frac {b \arctan \left (\frac {b \cos \left (x \right )}{\sqrt {a b}}\right )}{\left (a +b \right ) \sqrt {a b}}+\frac {\ln \left (\cos \left (x \right )-1\right )}{2 a +2 b}\) | \(56\) |
risch | \(\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{a +b}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{a +b}+\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i x}}{b}+1\right )}{2 a \left (a +b \right )}-\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i x}}{b}+1\right )}{2 a \left (a +b \right )}\) | \(111\) |
-1/(2*a+2*b)*ln(1+cos(x))-b/(a+b)/(a*b)^(1/2)*arctan(b*cos(x)/(a*b)^(1/2)) +1/(2*a+2*b)*ln(cos(x)-1)
Time = 0.26 (sec) , antiderivative size = 113, normalized size of antiderivative = 2.69 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=\left [\frac {\sqrt {-\frac {b}{a}} \log \left (\frac {b \cos \left (x\right )^{2} - 2 \, a \sqrt {-\frac {b}{a}} \cos \left (x\right ) - a}{b \cos \left (x\right )^{2} + a}\right ) - \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{2 \, {\left (a + b\right )}}, -\frac {2 \, \sqrt {\frac {b}{a}} \arctan \left (\sqrt {\frac {b}{a}} \cos \left (x\right )\right ) + \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{2 \, {\left (a + b\right )}}\right ] \]
[1/2*(sqrt(-b/a)*log((b*cos(x)^2 - 2*a*sqrt(-b/a)*cos(x) - a)/(b*cos(x)^2 + a)) - log(1/2*cos(x) + 1/2) + log(-1/2*cos(x) + 1/2))/(a + b), -1/2*(2*s qrt(b/a)*arctan(sqrt(b/a)*cos(x)) + log(1/2*cos(x) + 1/2) - log(-1/2*cos(x ) + 1/2))/(a + b)]
\[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=\int \frac {\csc {\left (x \right )}}{a + b \cos ^{2}{\left (x \right )}}\, dx \]
Time = 0.33 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.14 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=-\frac {b \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )}} - \frac {\log \left (\cos \left (x\right ) + 1\right )}{2 \, {\left (a + b\right )}} + \frac {\log \left (\cos \left (x\right ) - 1\right )}{2 \, {\left (a + b\right )}} \]
-b*arctan(b*cos(x)/sqrt(a*b))/(sqrt(a*b)*(a + b)) - 1/2*log(cos(x) + 1)/(a + b) + 1/2*log(cos(x) - 1)/(a + b)
Time = 0.34 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.19 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=-\frac {b \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )}} - \frac {\log \left (\cos \left (x\right ) + 1\right )}{2 \, {\left (a + b\right )}} + \frac {\log \left (-\cos \left (x\right ) + 1\right )}{2 \, {\left (a + b\right )}} \]
-b*arctan(b*cos(x)/sqrt(a*b))/(sqrt(a*b)*(a + b)) - 1/2*log(cos(x) + 1)/(a + b) + 1/2*log(-cos(x) + 1)/(a + b)
Time = 2.91 (sec) , antiderivative size = 853, normalized size of antiderivative = 20.31 \[ \int \frac {\csc (x)}{a+b \cos ^2(x)} \, dx=\frac {\mathrm {atan}\left (\frac {\frac {\left (\frac {8\,a\,b^3+4\,b^4+4\,a^2\,b^2-\frac {\cos \left (x\right )\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{2\,\left (a+b\right )}}{2\,\left (a+b\right )}+4\,b^3\,\cos \left (x\right )\right )\,1{}\mathrm {i}}{2\,\left (a+b\right )}-\frac {\left (\frac {8\,a\,b^3+4\,b^4+4\,a^2\,b^2+\frac {\cos \left (x\right )\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{2\,\left (a+b\right )}}{2\,\left (a+b\right )}-4\,b^3\,\cos \left (x\right )\right )\,1{}\mathrm {i}}{2\,\left (a+b\right )}}{\frac {\frac {8\,a\,b^3+4\,b^4+4\,a^2\,b^2-\frac {\cos \left (x\right )\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{2\,\left (a+b\right )}}{2\,\left (a+b\right )}+4\,b^3\,\cos \left (x\right )}{2\,\left (a+b\right )}+\frac {\frac {8\,a\,b^3+4\,b^4+4\,a^2\,b^2+\frac {\cos \left (x\right )\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{2\,\left (a+b\right )}}{2\,\left (a+b\right )}-4\,b^3\,\cos \left (x\right )}{2\,\left (a+b\right )}}\right )\,1{}\mathrm {i}}{a+b}+\frac {\mathrm {atan}\left (\frac {\frac {\sqrt {-a\,b}\,\left (2\,b^3\,\cos \left (x\right )+\frac {\sqrt {-a\,b}\,\left (4\,a\,b^3+2\,b^4+2\,a^2\,b^2-\frac {\cos \left (x\right )\,\sqrt {-a\,b}\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{4\,\left (a^2+b\,a\right )}\right )}{2\,\left (a^2+b\,a\right )}\right )\,1{}\mathrm {i}}{a^2+b\,a}+\frac {\sqrt {-a\,b}\,\left (2\,b^3\,\cos \left (x\right )-\frac {\sqrt {-a\,b}\,\left (4\,a\,b^3+2\,b^4+2\,a^2\,b^2+\frac {\cos \left (x\right )\,\sqrt {-a\,b}\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{4\,\left (a^2+b\,a\right )}\right )}{2\,\left (a^2+b\,a\right )}\right )\,1{}\mathrm {i}}{a^2+b\,a}}{\frac {\sqrt {-a\,b}\,\left (2\,b^3\,\cos \left (x\right )+\frac {\sqrt {-a\,b}\,\left (4\,a\,b^3+2\,b^4+2\,a^2\,b^2-\frac {\cos \left (x\right )\,\sqrt {-a\,b}\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{4\,\left (a^2+b\,a\right )}\right )}{2\,\left (a^2+b\,a\right )}\right )}{a^2+b\,a}-\frac {\sqrt {-a\,b}\,\left (2\,b^3\,\cos \left (x\right )-\frac {\sqrt {-a\,b}\,\left (4\,a\,b^3+2\,b^4+2\,a^2\,b^2+\frac {\cos \left (x\right )\,\sqrt {-a\,b}\,\left (-8\,a^3\,b^2-8\,a^2\,b^3+8\,a\,b^4+8\,b^5\right )}{4\,\left (a^2+b\,a\right )}\right )}{2\,\left (a^2+b\,a\right )}\right )}{a^2+b\,a}}\right )\,\sqrt {-a\,b}\,1{}\mathrm {i}}{a\,\left (a+b\right )} \]
(atan(((((8*a*b^3 + 4*b^4 + 4*a^2*b^2 - (cos(x)*(8*a*b^4 + 8*b^5 - 8*a^2*b ^3 - 8*a^3*b^2))/(2*(a + b)))/(2*(a + b)) + 4*b^3*cos(x))*1i)/(2*(a + b)) - (((8*a*b^3 + 4*b^4 + 4*a^2*b^2 + (cos(x)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2))/(2*(a + b)))/(2*(a + b)) - 4*b^3*cos(x))*1i)/(2*(a + b)))/(((8 *a*b^3 + 4*b^4 + 4*a^2*b^2 - (cos(x)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3* b^2))/(2*(a + b)))/(2*(a + b)) + 4*b^3*cos(x))/(2*(a + b)) + ((8*a*b^3 + 4 *b^4 + 4*a^2*b^2 + (cos(x)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2))/(2*( a + b)))/(2*(a + b)) - 4*b^3*cos(x))/(2*(a + b))))*1i)/(a + b) + (atan(((( -a*b)^(1/2)*(2*b^3*cos(x) + ((-a*b)^(1/2)*(4*a*b^3 + 2*b^4 + 2*a^2*b^2 - ( cos(x)*(-a*b)^(1/2)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2))/(4*(a*b + a ^2))))/(2*(a*b + a^2)))*1i)/(a*b + a^2) + ((-a*b)^(1/2)*(2*b^3*cos(x) - (( -a*b)^(1/2)*(4*a*b^3 + 2*b^4 + 2*a^2*b^2 + (cos(x)*(-a*b)^(1/2)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2))/(4*(a*b + a^2))))/(2*(a*b + a^2)))*1i)/(a *b + a^2))/(((-a*b)^(1/2)*(2*b^3*cos(x) + ((-a*b)^(1/2)*(4*a*b^3 + 2*b^4 + 2*a^2*b^2 - (cos(x)*(-a*b)^(1/2)*(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2 ))/(4*(a*b + a^2))))/(2*(a*b + a^2))))/(a*b + a^2) - ((-a*b)^(1/2)*(2*b^3* cos(x) - ((-a*b)^(1/2)*(4*a*b^3 + 2*b^4 + 2*a^2*b^2 + (cos(x)*(-a*b)^(1/2) *(8*a*b^4 + 8*b^5 - 8*a^2*b^3 - 8*a^3*b^2))/(4*(a*b + a^2))))/(2*(a*b + a^ 2))))/(a*b + a^2)))*(-a*b)^(1/2)*1i)/(a*(a + b))